/*
 * crash_protocol_event.h
 *
 *  Created on: 07.07.2013
 *      Author: SpirTanol
 */

#ifndef CRASH_PROTOCOL_EVENT_H_
#define CRASH_PROTOCOL_EVENT_H_

#include "events/protocol_event.h"
#include "global.h"

struct CrashData;

class CrashProtocolEvent : public ProtocolEvent
{
	int oCode;
	double oCur[3];
	uint oVol[3];

public:
	CrashProtocolEvent(const CrashData &data);
	~CrashProtocolEvent();

	QString toString() const; // [virtual]

	inline int code() const { return oCode; }

	inline uint vol(Phase phase) const { return oVol[phase]; }
	inline double cur(Phase phase) const { return oCur[phase]; }

};

#endif /* CRASH_PROTOCOL_EVENT_H_ */
